package hadooprpc;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ipc.RPC;

import java.io.IOException;
import java.net.InetSocketAddress;

public class MyClient {
    public static void main(String[] args) {
        /**
         * y(Class<T> protocol, long clientVersion, InetSocketAddress addr, Configuration conf
         */
        try {
            BizProtocol proxy = RPC.getProxy(BizProtocol.class, BizProtocol.versionID,
                    new InetSocketAddress("localhost", 9999), new Configuration());
            proxy.sayHello(" spark");
            proxy.mkdirDirects("/hello");

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
